package com.martin.dms.services;

import java.util.List;

import com.martin.dms.model.Category;

/**
 * Service that manages the Category entity.
 * 
 * @author mtsvetkov
 */
public interface CategoryService {

    /**
     * Retrieves all categories.
     * 
     * @return a list with all categories.
     */
    public List<Category> getAll();

    /**
     * Retrieves a category.
     * 
     * @param id - the id of the category.
     * @return the category.
     */
    public Category get(long id);

    /**
     * Deletes a category.
     * 
     * @param id - the id of the category.
     */
    public void delete(long id);

    /**
     * Updates the content of a given category.
     * 
     * @param id - the id of the category.
     * @param name - the updated name of the category.
     * @param itemIds - the ids of the items in the category.
     */
    public void update(long id, String name, List<Long> itemIds);

    /**
     * Creates a new category.
     * 
     * @param name - the name of the new category.
     * @param itemIds - the items in the new category.
     */
    public void create(String name, List<Long> itemIds);
}
